<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    .card {
      width: 100px;
      height: 100px;
      position: relative;
      perspective: 500px;
    }

    .face {
      width: 100%;
      height: 100%;
      position: absolute;
      transition: all 0.2s;
      /*背面不可见*/
      backface-visibility: hidden;
    }

    .card:hover .face {
      transform: rotateY(-180deg);
    }

    .back {
      transition: all 0.2s;
      width: 100%;
      height: 100%;
      position: absolute;
      text-align: center;
      line-height: 100px;
      background-color: cornflowerblue;
      /*背面不可见*/
      backface-visibility: hidden;
      transform: rotateY(180deg);
    }

    .card:hover .back {
      transform: rotateY(0deg);
    }

  </style>
</head>
<body>

<div class="card">
  <img class="face" src="https://t7.baidu.com/it/u=2604797219,1573897854&fm=193&f=GIF">
  <div class="back">
    <span>文字</span>
  </div>
</div>
</body>
</html>